<ul id="pagination">
    <li class="ui-corner-all ui-allow-hover" title="First Page">
        <a class="pager" loc="<?php echo $tab['id'] ?>" href="<?php echo $url_for ?>?<?php echo $get ?>=1&sort=<?php echo $tab['sort'] ?>&order=<?php echo $tab['order'] ?>">
            <span class="ui-icon ui-icon-seek-first" class="pager"></span>
        </a>
    </li>
    <li class="ui-corner-all ui-allow-hover" title="Previous Page">
        <a class="pager" loc="<?php echo $tab['id'] ?>" href="<?php echo $url_for ?>?<?php echo $get ?>=<?php echo $tab['pager']->getPreviousPage() ?>&sort=<?php echo $tab['sort'] ?>&order=<?php echo $tab['order'] ?>">
            <span class="ui-icon ui-icon-seek-prev" class="pager"></span>
        </a>
    </li>
        <?php foreach ($tab['pager']->getLinks() as $page):
            if ($page == $tab['pager']->getPage()): ?>
    <li class="ui-corner-all ui-state-active">
        <a class="pager" loc="<?php echo $tab['id'] ?>" href="<?php echo $url_for ?>?<?php echo $get ?>=<?php echo $page ?>&sort=<?php echo $tab['sort'] ?>&order=<?php echo $tab['order'] ?>">
            <span class="ui-no-icon"><?php echo $page ?></span>
        </a>
    </li>
            <?php else: ?>
    <li class="ui-corner-all ui-allow-hover">
        <a class="pager" loc="<?php echo $tab['id'] ?>"  href="<?php echo $url_for ?>?<?php echo $get ?>=<?php echo $page ?>&sort=<?php echo $tab['sort'] ?>&order=<?php echo $tab['order'] ?>">
            <span class="ui-no-icon"><?php echo $page ?></span>
        </a>
    </li>
            <?php endif; ?>
        <?php endforeach; ?>
    <li class="ui-corner-all ui-allow-hover" title="Next Page">
        <a class="pager" loc="<?php echo $tab['id'] ?>"  href="<?php echo $url_for ?>?<?php echo $get ?>=<?php echo $tab['pager']->getNextPage() ?>&sort=<?php echo $tab['sort'] ?>&order=<?php echo $tab['order'] ?>">
            <span class="ui-icon ui-icon-seek-next"></span>
        </a>
    </li>
    <li class="ui-corner-all ui-allow-hover" title="Last Page">
        <a class="pager" loc="<?php echo $tab['id'] ?>"  href="<?php echo $url_for ?>?<?php echo $get ?>=<?php echo $tab['pager']->getLastPage() ?>&sort=<?php echo $tab['sort'] ?>&order=<?php echo $tab['order'] ?>">
            <span class="ui-icon ui-icon-seek-end"></span>
        </a>
    </li>
</ul>
